function percoOutput(X, t, maxEpochs)

%Initialisierung
w = zeros(3,1);


for epochs = 1:maxEpochs
    w = perco(X, t, maxEpochs); % Gewichtsvektor trainieren
    
    fplot(@decisionboundary, [-0.2, 1.2, -0.2, 1.2], '-g');
    text(-0.1,-0.1,strcat(['Epochs: ',num2str(epochs),'/',num2str(maxEpochs)]));

    hold on;
    for i = 1:size(X,2)
       class = perco(X(:,i),w);
       symb = 'r';
       if (class == t(i))
           symb = 'b';
       end

       if class < 0
           symb = strcat([symb,'o']);
       elseif class == 0
           symb = strcat([symb,'p']);
       else
        symb = strcat([symb,'+']);
       end
       plot(X(2,i),X(3,i), symb);
    end
    hold off;
    pause(0.5);
end

function y = decisionboundary(x)
    y = -(w(1)+x*w(2))/w(3);
end
end